/*  1:   */ package org.intellij.images.thumbnail.actionSystem;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Presentation;
import org.intellij.images.thumbnail.ThumbnailView;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */ 
/*  8:   */ public final class ThumbnailViewActionUtil
/*  9:   */ {
/* 10:   */   public static ThumbnailView getVisibleThumbnailView(AnActionEvent paramAnActionEvent)
/* 11:   */   {
/* 12:38 */     ThumbnailView localThumbnailView = getThumbnailView(paramAnActionEvent);
/* 13:39 */     if ((localThumbnailView != null) && (localThumbnailView.isVisible())) {
/* 14:40 */       return localThumbnailView;
/* 15:   */     }
/* 16:42 */     return null;
/* 17:   */   }
/* 18:   */   
/* 19:   */   public static ThumbnailView getThumbnailView(AnActionEvent paramAnActionEvent)
/* 20:   */   {
/* 21:46 */     return (ThumbnailView)ThumbnailView.DATA_KEY.getData(paramAnActionEvent.getDataContext());
/* 22:   */   }
/* 23:   */   
/* 24:   */   public static boolean setEnabled(AnActionEvent paramAnActionEvent)
/* 25:   */   {
/* 26:56 */     ThumbnailView localThumbnailView = getVisibleThumbnailView(paramAnActionEvent);
/* 27:57 */     Presentation localPresentation = paramAnActionEvent.getPresentation();
/* 28:58 */     localPresentation.setEnabled(localThumbnailView != null);
/* 29:59 */     return localPresentation.isEnabled();
/* 30:   */   }
/* 31:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.thumbnail.actionSystem.ThumbnailViewActionUtil

 * JD-Core Version:    0.7.0.1

 */